Files in a file system can have several file attributes, such as a file ownership attribute, a file access permission, a file label, a file access control list, etc. An operating system can use a file's extended attributes to control access to the file. For example, a security enhanced operating system, such as Security Enhanced Linux® (SELinux), employs measures to ensure that every file in a file system is correctly labeled before any file is accessed. In SELinux, all of the files in a file system must be labeled appropriately in order for the correct policy to be applied when the files are being used. A file label can contain security-relevant information, such as a user, role, type, and, optionally, a level. There are times, however, when files are not labeled and file labels are incorrect. For example, SELinux may be running in a disabled mode, where newly created files are not labeled, or in a permissive mode, where users have permissions to incorrectly label files. In addition, files may be mislabeled because a file system is corrupt, policies have changed, etc.
When a file is not labeled or mislabeled, the operating system can deny a process and/or application access to a file. For example, SELinux can prevent an HTTP Server from reading files that are not correctly labeled. In addition, newly-created files and directories inherit the ‘type’ of their parent folders, and thus, files placed in an incorrect directory are also labeled incorrectly. To help prevent such problems, at system boot up, the operating system can search the entire file system tree (or a subset) for files which are mislabeled and unlabeled to correctly label the files. As a security measure, SELinux, so far, has to place all processes on hold until the labels for all of the files are verified to ensure that a process is not inadvertently denied access and that newly created files do not inherit the incorrect ‘type.’ For example, upon a boot up procedure of a computing system, the operating system can walk through a file system tree, file by file, and place all of the processes requesting file access on hold until the entire file system is examined and any mislabeled and unlabeled files are correctly labeled. The processes, however, can be placed on hold for a significant amount of time (e.g., hours, days) depending on the size of the file system, which can result in a large amount of lost business.